package org.coderjonny.controller;


import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class TestController {

    @Resource
    ConfigurableApplicationContext context;

    @GetMapping("/test")
    public String test(String key){
        String property = context.getEnvironment().getProperty(key);
        System.out.println(property);
        return property;
    }
}
